\hypertarget{classCBuffer}{
\section{\-C\-Buffer \-Class \-Reference}
\label{classCBuffer}\index{\-C\-Buffer@{\-C\-Buffer}}
}


\-Dynamic push and pop \-Buffer for audio samples.  




{\ttfamily \#include $<$buffer.\-h$>$}

\subsection*{\-Public \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classCBuffer_a9aa6d54f4896c98dd9e2269969f3ca2a}{\-C\-Buffer} ()
\begin{DoxyCompactList}\small\item\em \-Dynamic push and pop \-Buffer for audio samples. \end{DoxyCompactList}\item 
virtual \hyperlink{classCBuffer_ab5e8bcbbfc7920c3cca12094f211cea9}{$\sim$\-C\-Buffer} ()
\item 
void \hyperlink{classCBuffer_a1e70e071b74fd317d9298538f715b134}{write} (const double $\ast$p\-Data, unsigned int p\-Count)
\item 
void \hyperlink{classCBuffer_a096be90e7c576dab87cc2a47637a5887}{read} (double $\ast$p\-Data, unsigned int p\-Count)
\item 
double $\ast$ \hyperlink{classCBuffer_a0b2dda3651225aed1dfd14f79db8a50c}{get\-Unprocessed\-Buffer} (unsigned int p\-Count)
\item 
void \hyperlink{classCBuffer_a88a7cec4289ab6145db2be4db0dbbdb1}{put\-Processed\-Buffer} (double $\ast$p\-Data, unsigned int p\-Count)
\item 
unsigned int \hyperlink{classCBuffer_a00040b6054f9f0b74089e27ff23c856d}{get\-Input\-Buffer\-Size} ()
\item 
unsigned int \hyperlink{classCBuffer_a7c1590c934d6e06913e21da138faf8ba}{get\-Ouput\-Buffer\-Size} ()
\end{DoxyCompactItemize}
\subsection*{\-Protected \-Attributes}
\begin{DoxyCompactItemize}
\item 
queue$<$ double $>$ \hyperlink{classCBuffer_a471725e1d593b783bd660c81ff0bd5ea}{m\-Input\-Buffer}
\item 
queue$<$ double $>$ \hyperlink{classCBuffer_a7759654d02659327cc40637bd5cfce48}{m\-Output\-Buffer}
\end{DoxyCompactItemize}


\subsection{\-Detailed \-Description}
\-Dynamic push and pop \-Buffer for audio samples. 

\begin{DoxyAuthor}{\-Author}
\-Bernhard \-Schildendorfer
\end{DoxyAuthor}
\hyperlink{classCBuffer}{\-C\-Buffer} provides a fixed length byte-\/buffer which indicates if it's full.

\hyperlink{classCBuffer}{\-C\-Buffer} contains two \-F\-I\-F\-O \-Queues, which are called input-\/buffer and output-\/buffer. \-Data which is written to \hyperlink{classCBuffer}{\-C\-Buffer} is stored to the input-\/buffer, data which is read from \hyperlink{classCBuffer}{\-C\-Buffer} is read from the output-\/buffer. \-To transfer data between them, the method process\-Buffer() needs to be called. \-Manipulation to the buffer is possible via the byte$\ast$ of is\-Buffer\-Ready(); 

\subsection{\-Constructor \& \-Destructor \-Documentation}
\hypertarget{classCBuffer_a9aa6d54f4896c98dd9e2269969f3ca2a}{
\index{\-C\-Buffer@{\-C\-Buffer}!\-C\-Buffer@{\-C\-Buffer}}
\index{\-C\-Buffer@{\-C\-Buffer}!CBuffer@{\-C\-Buffer}}
\subsubsection[{\-C\-Buffer}]{\setlength{\rightskip}{0pt plus 5cm}\-C\-Buffer\-::\-C\-Buffer (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{classCBuffer_a9aa6d54f4896c98dd9e2269969f3ca2a}


\-Dynamic push and pop \-Buffer for audio samples. 

\begin{DoxyAuthor}{\-Author}
\-Bernhard \-Schildendorfer
\end{DoxyAuthor}
\hyperlink{classCBuffer}{\-C\-Buffer} provides a fixed length byte-\/buffer which indicates if it's full.

\hyperlink{classCBuffer}{\-C\-Buffer} contains two \-F\-I\-F\-O \-Queues, which are called input-\/buffer and output-\/buffer. \-Data which is written to \hyperlink{classCBuffer}{\-C\-Buffer} is stored to the input-\/buffer, data which is read from \hyperlink{classCBuffer}{\-C\-Buffer} is read from the output-\/buffer. \-To transfer data between them, the method process\-Buffer() needs to be called. \-Manipulation to the buffer is possible via the byte$\ast$ of is\-Buffer\-Ready(); \hypertarget{classCBuffer_ab5e8bcbbfc7920c3cca12094f211cea9}{
\index{\-C\-Buffer@{\-C\-Buffer}!$\sim$\-C\-Buffer@{$\sim$\-C\-Buffer}}
\index{$\sim$\-C\-Buffer@{$\sim$\-C\-Buffer}!CBuffer@{\-C\-Buffer}}
\subsubsection[{$\sim$\-C\-Buffer}]{\setlength{\rightskip}{0pt plus 5cm}\-C\-Buffer\-::$\sim$\-C\-Buffer (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classCBuffer_ab5e8bcbbfc7920c3cca12094f211cea9}


\subsection{\-Member \-Function \-Documentation}
\hypertarget{classCBuffer_a00040b6054f9f0b74089e27ff23c856d}{
\index{\-C\-Buffer@{\-C\-Buffer}!get\-Input\-Buffer\-Size@{get\-Input\-Buffer\-Size}}
\index{get\-Input\-Buffer\-Size@{get\-Input\-Buffer\-Size}!CBuffer@{\-C\-Buffer}}
\subsubsection[{get\-Input\-Buffer\-Size}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int \-C\-Buffer\-::get\-Input\-Buffer\-Size (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{classCBuffer_a00040b6054f9f0b74089e27ff23c856d}
\-Returns the number of elements in the input buffer. \hypertarget{classCBuffer_a7c1590c934d6e06913e21da138faf8ba}{
\index{\-C\-Buffer@{\-C\-Buffer}!get\-Ouput\-Buffer\-Size@{get\-Ouput\-Buffer\-Size}}
\index{get\-Ouput\-Buffer\-Size@{get\-Ouput\-Buffer\-Size}!CBuffer@{\-C\-Buffer}}
\subsubsection[{get\-Ouput\-Buffer\-Size}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int \-C\-Buffer\-::get\-Ouput\-Buffer\-Size (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{classCBuffer_a7c1590c934d6e06913e21da138faf8ba}
\-Returns the number of elements in the output buffer. \hypertarget{classCBuffer_a0b2dda3651225aed1dfd14f79db8a50c}{
\index{\-C\-Buffer@{\-C\-Buffer}!get\-Unprocessed\-Buffer@{get\-Unprocessed\-Buffer}}
\index{get\-Unprocessed\-Buffer@{get\-Unprocessed\-Buffer}!CBuffer@{\-C\-Buffer}}
\subsubsection[{get\-Unprocessed\-Buffer}]{\setlength{\rightskip}{0pt plus 5cm}double $\ast$ \-C\-Buffer\-::get\-Unprocessed\-Buffer (
\begin{DoxyParamCaption}
\item[{unsigned int}]{p\-Count}
\end{DoxyParamCaption}
)}}
\label{classCBuffer_a0b2dda3651225aed1dfd14f79db8a50c}
\-Get p\-Count elements of the unprocessed buffer. \-Elements of the input buffer are deleted.


\begin{DoxyParams}{\-Parameters}
{\em p\-Count} & \-The amount of elements to be retrieved \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{\-Returns}
\-The retrieved buffer elements 
\end{DoxyReturn}
\hypertarget{classCBuffer_a88a7cec4289ab6145db2be4db0dbbdb1}{
\index{\-C\-Buffer@{\-C\-Buffer}!put\-Processed\-Buffer@{put\-Processed\-Buffer}}
\index{put\-Processed\-Buffer@{put\-Processed\-Buffer}!CBuffer@{\-C\-Buffer}}
\subsubsection[{put\-Processed\-Buffer}]{\setlength{\rightskip}{0pt plus 5cm}void \-C\-Buffer\-::put\-Processed\-Buffer (
\begin{DoxyParamCaption}
\item[{double $\ast$}]{p\-Data, }
\item[{unsigned int}]{p\-Count}
\end{DoxyParamCaption}
)}}
\label{classCBuffer_a88a7cec4289ab6145db2be4db0dbbdb1}
\-Writes p\-Count elements into the output buffer.


\begin{DoxyParams}{\-Parameters}
{\em p\-Data} & \-The data to be written into the buffer \\
\hline
{\em p\-Count} & \-The size of the data array \\
\hline
\end{DoxyParams}
\hypertarget{classCBuffer_a096be90e7c576dab87cc2a47637a5887}{
\index{\-C\-Buffer@{\-C\-Buffer}!read@{read}}
\index{read@{read}!CBuffer@{\-C\-Buffer}}
\subsubsection[{read}]{\setlength{\rightskip}{0pt plus 5cm}void \-C\-Buffer\-::read (
\begin{DoxyParamCaption}
\item[{double $\ast$}]{p\-Data, }
\item[{unsigned int}]{p\-Count}
\end{DoxyParamCaption}
)}}
\label{classCBuffer_a096be90e7c576dab87cc2a47637a5887}
\-Receives and removes p\-Count elements from the output buffer. \-If there is less data in the buffer than requested by p\-Count, additional zeros will be written.


\begin{DoxyParams}{\-Parameters}
{\em p\-Data} & \-The array that the retrieved data is written on \\
\hline
{\em p\-Count} & \-The size of the data array \\
\hline
\end{DoxyParams}
\hypertarget{classCBuffer_a1e70e071b74fd317d9298538f715b134}{
\index{\-C\-Buffer@{\-C\-Buffer}!write@{write}}
\index{write@{write}!CBuffer@{\-C\-Buffer}}
\subsubsection[{write}]{\setlength{\rightskip}{0pt plus 5cm}void \-C\-Buffer\-::write (
\begin{DoxyParamCaption}
\item[{const double $\ast$}]{p\-Data, }
\item[{unsigned int}]{p\-Count}
\end{DoxyParamCaption}
)}}
\label{classCBuffer_a1e70e071b74fd317d9298538f715b134}
\-Stores p\-Count bytes in the buffer.


\begin{DoxyParams}{\-Parameters}
{\em p\-Data} & \-The data to be stored in the buffer \\
\hline
{\em p\-Count} & \-The size of the data to be stored in the buffer \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{\-Returns}
\-If the buffer is full, a byte pointer is returned to the beginning of the full buffer, null if buffer is not full 
\end{DoxyReturn}


\subsection{\-Member \-Data \-Documentation}
\hypertarget{classCBuffer_a471725e1d593b783bd660c81ff0bd5ea}{
\index{\-C\-Buffer@{\-C\-Buffer}!m\-Input\-Buffer@{m\-Input\-Buffer}}
\index{m\-Input\-Buffer@{m\-Input\-Buffer}!CBuffer@{\-C\-Buffer}}
\subsubsection[{m\-Input\-Buffer}]{\setlength{\rightskip}{0pt plus 5cm}queue$<$double$>$ {\bf \-C\-Buffer\-::m\-Input\-Buffer}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{classCBuffer_a471725e1d593b783bd660c81ff0bd5ea}
\hypertarget{classCBuffer_a7759654d02659327cc40637bd5cfce48}{
\index{\-C\-Buffer@{\-C\-Buffer}!m\-Output\-Buffer@{m\-Output\-Buffer}}
\index{m\-Output\-Buffer@{m\-Output\-Buffer}!CBuffer@{\-C\-Buffer}}
\subsubsection[{m\-Output\-Buffer}]{\setlength{\rightskip}{0pt plus 5cm}queue$<$double$>$ {\bf \-C\-Buffer\-::m\-Output\-Buffer}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{classCBuffer_a7759654d02659327cc40637bd5cfce48}


\-The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
\hyperlink{buffer_8h}{buffer.\-h}\item 
\hyperlink{buffer_8cxx}{buffer.\-cxx}\end{DoxyCompactItemize}
